<?php
define('EmpireCMSAdmin','1');
define('EmpireCMSAPage','login');
define('EmpireCMSNFPage','1');
require("../class/connect.php");
require("../class/functions.php");
//风格
$loginadminstyleid=EcmsReturnAdminStyle();
//变量处理
$empirecmskey1='';
$empirecmskey2='';
$empirecmskey3='';
$empirecmskey4='';
$empirecmskey5='';
if($_POST['empirecmskey1']&&$_POST['empirecmskey2']&&$_POST['empirecmskey3']&&$_POST['empirecmskey4']&&$_POST['empirecmskey5'])
{
	$empirecmskey1=RepPostVar($_POST['empirecmskey1']);
	$empirecmskey2=RepPostVar($_POST['empirecmskey2']);
	$empirecmskey3=RepPostVar($_POST['empirecmskey3']);
	$empirecmskey4=RepPostVar($_POST['empirecmskey4']);
	$empirecmskey5=RepPostVar($_POST['empirecmskey5']);
	$ecertkeyrndstr=$empirecmskey1.'#!#'.$empirecmskey2.'#!#'.$empirecmskey3.'#!#'.$empirecmskey4.'#!#'.$empirecmskey5;
	esetcookie('ecertkeyrnds',$ecertkeyrndstr,0);
}
elseif(getcvar('ecertkeyrnds'))
{
	$certr=explode('#!#',getcvar('ecertkeyrnds'));
	$empirecmskey1=RepPostVar($certr[0]);
	$empirecmskey2=RepPostVar($certr[1]);
	$empirecmskey3=RepPostVar($certr[2]);
	$empirecmskey4=RepPostVar($certr[3]);
	$empirecmskey5=RepPostVar($certr[4]);
}
?>
﻿<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>网站管理系统</title>

<link href="css/admin.css" rel="stylesheet" type="text/css" />

<script>
if(self!=top)
{
	parent.location.href='index.php';
}
function CheckLogin(obj){
	if(obj.username.value=='')
	{
		alert('请输入用户名');
		obj.username.focus();
		return false;
	}
	if(obj.password.value=='')
	{
		alert('请输入登录密码');
		obj.password.focus();
		return false;
	}
	if(obj.loginauth!=null)
	{
		if(obj.loginauth.value=='')
		{
			alert('请输入认证码');
			obj.loginauth.focus();
			return false;
		}
	}
	if(obj.key!=null)
	{
		if(obj.key.value=='')
		{
			alert('请输入验证码');
			obj.key.focus();
			return false;
		}
	}
	return true;
}
</script>
</head>

<body text="383636" bgcolor="#FFFFFF" onLoad="document.login.username.focus();">
<center>
<div class="admin">
    <form name="login" id="login" method="post" action="ecmsadmin.php" onSubmit="return CheckLogin(document.login);">
    <input type="hidden" name="enews" value="login">
    <div class="login">
      <dl>
        <dt>管理员帐号登录</dt>
        <dt>
          <h1>用户名</h1>
          <h2>
            <input name="username" type="text" class="login_name" border="0" />
          </h2>
        </dt>
        <dt>
          <h1>密　码</h1>
          <h2>
            <input name="password" type="password" class="login_pass" id="password" />
          </h2>
        </dt>
        <dt>
          <h1>认证码</h1>
          <h2>
            
		           <input name="loginauth" type="password" id="loginauth" class="login_rzm" size="24">
            </h2>
        </dt>
        <dt style="margin-top:10px; margin-left:40px; display:inline;">
          <h3 align="center"><input name="imageField" type="image" src="images/denglu.gif" border="0"></h3>
          <h3 align="center"><input name="" type="reset" class="quxiao" value="　" border="0" /></h3>
        </dt>

      </dl>
    </div>
  </form>
  
</div>
<div id="pop" class="pop" style="display:none">
<div class="pop_head"><a href="javascript:void(0);" onClick="hide()">关闭</a></div>
</div>


<script>
if(document.login.equestion.value==0)
{
	showanswer.style.display='none';
}
</script>
</center>
</body>
</html>